package com.tyk.bookstore.back.order.model.query;


import com.tyk.bookstore.back.common.core.model.page.PageQuery;
import com.tyk.bookstore.back.common.core.model.type.PaymentWay;
import com.tyk.bookstore.back.order.model.enume.OrderState;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 订单管理
 */
@Data
public class OrderPageQuery extends PageQuery {

    @Schema(description = "订单号")
    private String orderNo;

    @Schema(description = "运单号")
    private String trackingNo;

    @Schema(description = "仓库ID")
    private Long warehouseId;

    @Schema(description = "书籍编号")
    private String bookNo;

    @Schema(description = "支付方式[0商城余额，1支付宝，2微信]")
    private PaymentWay paymentWay;

    @Schema(description = "订单金额：下限")
    @Min(0)
    private BigDecimal amountFrom;

    @Schema(description = "订单金额：上限")
    private BigDecimal amountTo;

    @Schema(description = "订单状态")
    private OrderState state;

    @Schema(description = "会员昵称")
    private String nickName;

    @Schema(description = "收件人姓名")
    private String cneeName;

    @Schema(description = "收件人电话")
    private String cneePhone;

    @Schema(description = "收件人所在区域")
    private String cneeAreaCode;

    @Schema(description = "下单时间：起始时间")
    private LocalDateTime createTimeFrom;

    @Schema(description = "下单时间：终止时间")
    private LocalDateTime createTimeTo;

    @Schema(description = "支付时间：起始时间")
    private LocalDateTime paymentTimeFrom;

    @Schema(description = "支付时间：终止时间")
    private LocalDateTime paymentTimeTo;

}
